home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / mach / mach.defs < prev    next >
Text File  |  1994-10-24  |  24KB  |  863 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie Mellon
  24.  * the rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    mach.defs,v $
  29.  * Revision 2.15  93/01/21  12:23:14  danner
  30.  *     New interface for task_ras_control.
  31.  *     [93/01/19  16:35:06  bershad]
  32.  * 
  33.  * Revision 2.14  92/07/20  13:33:09  cmaeda
  34.  *     Added definition for task_set_ras_pc.
  35.  *     Uses message number recycled from old task_get_io_port.
  36.  *     [92/05/11  14:37:53  cmaeda]
  37.  * 
  38.  * Revision 2.13  92/01/15  13:45:00  rpd
  39.  *     Changed MACH_IPC_COMPAT conditionals to default to not present.
  40.  * 
  41.  * Revision 2.12  92/01/14  16:45:18  rpd
  42.  *     Changed mach_port_array_t usages to remain compatible,
  43.  *     because the definition of the type changed incompatibly.
  44.  *     [92/01/13            rpd]
  45.  *     Updated vm_region for new memory_object_name_t definition.
  46.  *     [91/12/31            rpd]
  47.  * 
  48.  * Revision 2.11  92/01/03  20:20:53  dbg
  49.  *     Changed (new) task_get_emulation_vector,
  50.  *     task_set_emulation_vector to pass data out-of-line.  Old
  51.  *     routines still pass data in-line, for compatibility.
  52.  *     [92/01/03            dbg]
  53.  * 
  54.  *     Add 'CountInOut' tag to routines returning variable-length
  55.  *     inline arrays.  Remove 'IsLong' tag from routines passing or
  56.  *     returning variable-length arrays.  Old routines left under
  57.  *     'xxx_' names.  REMOVE THESE SOON!
  58.  * 
  59.  *     I used the message IDs from the Mach 1.5 thread calls (before
  60.  *     the real thread support went in) - they haven't been used since
  61.  *     1988.
  62.  *     [91/11/26            dbg]
  63.  * 
  64.  * Revision 2.10  91/08/28  11:15:04  jsb
  65.  *     Precious page support:  Add new version of memory_object_lock_request.
  66.  *     Add memory_object_{ready,change_attributes}.
  67.  *     [91/07/03  14:03:34  dlb]
  68.  *     Added KERNEL_USER definitions (for NORMA support).
  69.  *     [91/08/15  09:58:13  jsb]
  70.  * 
  71.  * Revision 2.9  91/07/31  17:53:17  dbg
  72.  *     Added user-settable 'dealloc' flag to data argument of
  73.  *     memory_object_data_supply.  Needs new MiG.
  74.  *     USERS OF THIS FUNCTION MUST RE-LINK!!
  75.  *     [91/07/29            dbg]
  76.  * 
  77.  *     MACH_IPC_COMPAT: set C type for backup argument to
  78.  *     port_set_backup to be 'mach_port_t'.  If mach_interface.h is
  79.  *     included with MACH_IPC_COMPAT == 0, the type 'port_t' is not
  80.  *     defined.
  81.  * 
  82.  *     Removed vm_pageable.
  83.  *     [91/06/24            dbg]
  84.  * 
  85.  * Revision 2.8  91/07/01  08:25:09  jsb
  86.  *     From David Black at OSF: added memory_object_data_supply.
  87.  *     [91/06/29  14:59:47  jsb]
  88.  * 
  89.  * Revision 2.7  91/06/06  17:07:51  jsb
  90.  *     Added task_get_emulation_vector, task_set_emulation_vector.
  91.  *     [91/05/24  18:26:01  jsb]
  92.  * 
  93.  * Revision 2.6  91/05/14  16:54:18  mrt
  94.  *     Correcting copyright
  95.  * 
  96.  * Revision 2.5  91/02/05  17:33:12  mrt
  97.  *     Changed to new Mach copyright
  98.  *     [91/02/01  17:17:41  mrt]
  99.  * 
  100.  * Revision 2.4  90/06/02  14:58:09  rpd
  101.  *     Changed reply_to argument of memory_object_lock_request
  102.  *     to default to a send-once right but still allow send rights.
  103.  *     [90/05/31            rpd]
  104.  * 
  105.  *     Changes for the emulator: remove vm_allocate, redefine vm_map.
  106.  * 
  107.  *     Obsoleted vm_allocate_with_pager.
  108.  *     [90/04/08            rpd]
  109.  *     Converted to new IPC.  Purged MACH_NP, MACH_NET.
  110.  *     Moved vm_set_default_memory_manager, memory_object_get_attributes.
  111.  *     [90/03/26  22:31:41  rpd]
  112.  * 
  113.  *
  114.  * Condensed history:
  115.  *    Added vm_machine_attribute (af).
  116.  *    Added memory_object_get_attributes (mwyoung).
  117.  *    Added vm_set_default_memory_manager (mwyoung).
  118.  *    Added thread_set_priority (dbg).
  119.  *    Added vm_pageable (dbg).
  120.  *     Added port_set_backup (rpd).
  121.  *    Added memory_object_destroy (mwyoung).
  122.  *    Converted to memory_object_* names (mwyoung).
  123.  *    New port and port set calls (rpd).
  124.  *    Added documentation (mwyoung).
  125.  *    Added vm_map, pager_attributes, pager_data_error (mwyoung).
  126.  *    Added task_set_emulation and task_get_io_port (dorr).
  127.  *    Added new thread and task interfaces (dbg).
  128.  *    Reset history (avie).
  129.  */
  130.  
  131. /*
  132.  *    Matchmaker definitions file for Mach kernel interface.
  133.  */
  134.  
  135. subsystem
  136. #if    KERNEL_USER && defined(NEW_MACH_IPC)
  137.       KernelUser
  138. #endif    KERNEL_USER
  139. #if    KERNEL_SERVER && defined(NEW_MACH_IPC)
  140.       KernelServer
  141. #endif    KERNEL_SERVER
  142.                mach 2000;
  143.  
  144. #include <mach/std_types.defs>
  145. #include <mach/mach_types.defs>
  146.  
  147. skip;    /* old port_allocate */
  148. skip;    /* old port_deallocate */
  149. skip;    /* old port_enable */
  150. skip;    /* old port_disable */
  151. skip;    /* old port_select */
  152. skip;    /* old port_set_backlog */
  153. skip;    /* old port_status */
  154.  
  155. /*
  156.  *    Create a new task with an empty set of IPC rights,
  157.  *    and having an address space constructed from the
  158.  *    target task (or empty, if inherit_memory is FALSE).
  159.  */
  160. routine task_create(
  161.         target_task    : task_t;
  162.         inherit_memory    : boolean_t;
  163.     out    child_task    : task_t);
  164.  
  165. /*
  166.  *    Destroy the target task, causing all of its threads
  167.  *    to be destroyed, all of its IPC rights to be deallocated,
  168.  *    and all of its address space to be deallocated.
  169.  */
  170. routine task_terminate(
  171.         target_task    : task_t);
  172.  
  173. skip;    /* task_get_emulation_vector */
  174. skip;    /* task_set_emulation_vector */
  175.  
  176. /*
  177.  *    Returns the set of threads belonging to the target task.
  178.  */
  179. routine task_threads(
  180.         target_task    : task_t;
  181.     out    thread_list    : thread_array_t);
  182.  
  183. skip;    /* task_info:        MACH 3.0 */
  184. skip;    /* old task_status */
  185. skip;    /* old task_set_notify */
  186. skip;    /* old thread_create */
  187.  
  188. /*
  189.  *    Destroy the target thread.
  190.  */
  191. routine thread_terminate(
  192.         target_thread    : thread_t);
  193.  
  194. skip;    /* thread_get_state:    MACH 3.0 */
  195. skip;    /* thread_set_state:    MACH 3.0 */
  196. skip;    /* thread_info:        MACH 3.0 */
  197. skip;    /* old thread_mutate */
  198.  
  199. /*
  200.  *    Allocate zero-filled memory in the address space
  201.  *    of the target task, either at the specified address,
  202.  *    or wherever space can be found (if anywhere is TRUE),
  203.  *    of the specified size.  The address at which the
  204.  *    allocation actually took place is returned.
  205.  */
  206. routine vm_allocate(
  207.         target_task    : vm_task_t;
  208.     inout    address        : vm_address_t;
  209.         size        : vm_size_t;
  210.         anywhere    : boolean_t);
  211.  
  212. skip;    /* old vm_allocate_with_pager */
  213.  
  214. /*
  215.  *    Deallocate the specified range from the virtual
  216.  *    address space of the target task.
  217.  */
  218. routine vm_deallocate(
  219.         target_task    : vm_task_t;
  220.         address        : vm_address_t;
  221.         size        : vm_size_t);
  222.  
  223. /*
  224.  *    Set the current or maximum protection attribute
  225.  *    for the specified range of the virtual address
  226.  *    space of the target task.  The current protection
  227.  *    limits the memory access rights of threads within
  228.  *    the task; the maximum protection limits the accesses
  229.  *    that may be given in the current protection.
  230.  *    Protections are specified as a set of {read, write, execute}
  231.  *    *permissions*.
  232.  */
  233. routine vm_protect(
  234.         target_task    : vm_task_t;
  235.         address        : vm_address_t;
  236.         size        : vm_size_t;
  237.         set_maximum    : boolean_t;
  238.         new_protection    : vm_prot_t);
  239.  
  240. /*
  241.  *    Set the inheritance attribute for the specified range
  242.  *    of the virtual address space of the target task.
  243.  *    The inheritance value is one of {none, copy, share}, and
  244.  *    specifies how the child address space should acquire
  245.  *    this memory at the time of a task_create call.
  246.  */
  247. routine vm_inherit(
  248.         target_task    : vm_task_t;
  249.         address        : vm_address_t;
  250.         size        : vm_size_t;
  251.         new_inheritance    : vm_inherit_t);
  252.  
  253. /*
  254.  *    Returns the contents of the specified range of the
  255.  *    virtual address space of the target task.  [The
  256.  *    range must be aligned on a virtual page boundary,
  257.  *    and must be a multiple of pages in extent.  The
  258.  *    protection on the specified range must permit reading.]
  259.  */
  260. routine vm_read(
  261.         target_task    : vm_task_t;
  262.         address        : vm_address_t;
  263.         size        : vm_size_t;
  264.     out    data        : pointer_t);
  265.  
  266. /*
  267.  *    Writes the contents of the specified range of the
  268.  *    virtual address space of the target task.  [The
  269.  *    range must be aligned on a virtual page boundary,
  270.  *    and must be a multiple of pages in extent.  The
  271.  *    protection on the specified range must permit writing.]
  272.  */
  273. routine vm_write(
  274.         target_task    : vm_task_t;
  275.         address        : vm_address_t;
  276.         data        : pointer_t);
  277.  
  278. /*
  279.  *    Copy the contents of the source range of the virtual
  280.  *    address space of the target task to the destination
  281.  *    range in that same address space.  [Both of the
  282.  *    ranges must be aligned on a virtual page boundary,
  283.  *    and must be multiples of pages in extent.  The
  284.  *    protection on the source range must permit reading,
  285.  *    and the protection on the destination range must
  286.  *    permit writing.]
  287.  */
  288. routine vm_copy(
  289.         target_task    : vm_task_t;
  290.         source_address    : vm_address_t;
  291.         size        : vm_size_t;
  292.         dest_address    : vm_address_t);
  293.  
  294. /*
  295.  *    Returns information about the contents of the virtual
  296.  *    address space of the target task at the specified
  297.  *    address.  The returned protection, inheritance, sharing
  298.  *    and memory object values apply to the entire range described
  299.  *    by the address range returned; the memory object offset
  300.  *    corresponds to the beginning of the address range.
  301.  *    [If the specified address is not allocated, the next
  302.  *    highest address range is described.  If no addresses beyond
  303.  *    the one specified are allocated, the call returns KERN_NO_SPACE.]
  304.  */
  305. routine vm_region(
  306.         target_task    : vm_task_t;
  307.     inout    address        : vm_address_t;
  308.     out    size        : vm_size_t;
  309.     out    protection    : vm_prot_t;
  310.     out    max_protection    : vm_prot_t;
  311.     out    inheritance    : vm_inherit_t;
  312.     out    is_shared    : boolean_t;
  313. #ifdef    NEW_MACH_IPC
  314.     /* avoid out-translation of the argument */
  315.     out    object_name    : memory_object_name_t =
  316.                     MACH_MSG_TYPE_MOVE_SEND
  317.                     ctype: mach_port_t;
  318. #else    /* NEW_MACH_IPC */
  319.     out    object_name    : memory_object_name_t;
  320. #endif    /* NEW_MACH_IPC */
  321.     out    offset        : vm_offset_t);
  322.  
  323. /*
  324.  *    Return virtual memory statistics for the host
  325.  *    on which the target task resides.  [Note that the
  326.  *    statistics are not specific to the target task.]
  327.  */
  328. routine vm_statistics(
  329.         target_task    : vm_task_t;
  330.     out    vm_stats    : vm_statistics_data_t);
  331.  
  332. routine task_by_unix_pid(
  333.         target_task    : task_t;
  334.         process_id    : int;
  335.     out    result_task    : task_t);
  336.  
  337. skip;    /* old vm_pageable */
  338. skip;    /* mach_ports_register */
  339. skip;    /* mach_ports_lookup */
  340.  
  341. routine unix_pid(
  342.         target_task    : task_t;
  343.     out    process_id    : int);
  344.  
  345. /*
  346.  *    Redirect network IP messages to the specified Mach port.
  347.  */
  348. routine netipc_listen(
  349.         request_port    : port_t;
  350.         src_addr    : int;
  351.         dst_addr    : int;
  352.         src_port    : int;
  353.         dst_port    : int;
  354.         protocol    : int;
  355.         ipc_port    : port_t);
  356.  
  357. /*
  358.  *    Stop IP message redirection as set up by netipc_listen.
  359.  */
  360. routine netipc_ignore(
  361.         request_port    : port_t;
  362.         ipc_port    : port_t);
  363.  
  364. skip;    /* memory_object_data_provided */
  365. skip;    /* memory_object_data_unavailable */
  366. skip;    /* memory_object_get_attributes */
  367. skip;    /* vm_set_default_memory_manager */
  368. skip;    /* old pager_flush_request */
  369. skip;    /* xxx_memory_object_lock_request */
  370. skip;    /* memory_object_lock_request */
  371.  
  372. skip;    /* xxx_task_get_emulation_vector */
  373. skip;    /* xxx_task_set_emulation_vector */
  374.  
  375. /*
  376.  *    Returns information about the host on which the
  377.  *    target object resides.  [This object may be
  378.  *    a task, thread, or memory_object_control port.]
  379.  */
  380. routine xxx_host_info(
  381. #ifdef    NEW_MACH_IPC
  382.         target_task    : mach_port_t;
  383. #else    /* NEW_MACH_IPC */
  384.         target_task    : port_t;
  385. #endif    /* NEW_MACH_IPC */
  386.     out    info        : machine_info_data_t);
  387.  
  388. /*
  389.  *    Returns information about a particular processor on
  390.  *    the host on which the target task resides.
  391.  */
  392. routine xxx_slot_info(
  393.         target_task    : task_t;
  394.         slot        : int;
  395.     out    info        : machine_slot_data_t);
  396.  
  397. /*
  398.  *    Performs control operations (currently only
  399.  *    turning off or on) on a particular processor on
  400.  *    the host on which the target task resides.
  401.  */
  402. routine xxx_cpu_control(
  403.         target_task    : task_t;
  404.         cpu        : int;
  405.         running        : boolean_t);
  406.  
  407. skip;    /* old thread_statistics */
  408. skip;    /* old task_statistics */
  409. skip;    /* old netport_init */
  410. skip;    /* old netport_enter */
  411. skip;    /* old netport_remove */
  412. skip;    /* old thread_set_priority */
  413.  
  414. /*
  415.  *    Increment the suspend count for the target task.
  416.  *    No threads within a task may run when the suspend
  417.  *    count for that task is non-zero.
  418.  */
  419. routine    task_suspend(
  420.         target_task    : task_t);
  421.  
  422. /*
  423.  *    Decrement the suspend count for the target task,
  424.  *    if the count is currently non-zero.  If the resulting
  425.  *    suspend    count is zero, then threads within the task
  426.  *    that also have non-zero suspend counts may execute.
  427.  */
  428. routine    task_resume(
  429.         target_task    : task_t);
  430.  
  431. /*
  432.  *    Returns the current value of the selected special port
  433.  *    associated with the target task.
  434.  */
  435. routine task_get_special_port(
  436.         task        : task_t;
  437.         which_port    : int;
  438. #ifdef    NEW_MACH_IPC
  439.     out    special_port    : mach_port_t);
  440. #else    /* NEW_MACH_IPC */
  441.     out    special_port    : port_t);
  442. #endif    /* NEW_MACH_IPC */
  443.  
  444. /*
  445.  *    Set one of the special ports associated with the
  446.  *    target task.
  447.  */
  448. routine task_set_special_port(
  449.         task        : task_t;
  450.         which_port    : int;
  451. #ifdef    NEW_MACH_IPC
  452.         special_port    : mach_port_t);
  453. #else    /* NEW_MACH_IPC */
  454.         special_port    : port_t);
  455. #endif    /* NEW_MACH_IPC */
  456.  
  457. /*
  458.  *    Returns information about the target task.
  459.  */
  460. routine    task_info(
  461.         target_task    : task_t;
  462.         flavor        : int;
  463.     out    task_info_out    : task_info_t, IsLong);
  464.  
  465.  
  466. /*
  467.  *    Create a new thread within the target task, returning
  468.  *    the port representing that new thread.  The
  469.  *    initial execution state of the thread is undefined.
  470.  */
  471. routine thread_create(
  472.         parent_task    : task_t;
  473.     out    child_thread    : thread_t);
  474.  
  475. /*
  476.  *    Increment the suspend count for the target thread.
  477.  *    Once this call has completed, the thread will not
  478.  *    execute any further user or meta- instructions.
  479.  *    Once suspended, a thread may not execute again until
  480.  *    its suspend count is zero, and the suspend count
  481.  *    for its task is also zero.
  482.  */
  483. routine    thread_suspend(
  484.         target_thread    : thread_t);
  485.  
  486. /*
  487.  *    Decrement the suspend count for the target thread,
  488.  *    if that count is not already zero.
  489.  */
  490. routine    thread_resume(
  491.         target_thread    : thread_t);
  492.  
  493. /*
  494.  *    Cause any user or meta- instructions currently being
  495.  *    executed by the target thread to be aborted.  [Meta-
  496.  *    instructions consist of the basic traps for IPC
  497.  *    (e.g., msg_send, msg_receive) and self-identification
  498.  *    (e.g., task_self, thread_self, thread_reply).  Calls
  499.  *    described by MiG interfaces are not meta-instructions
  500.  *    themselves.]
  501.  */
  502. routine thread_abort(
  503.         target_thread    : thread_t);
  504.  
  505. /*
  506.  *    Return the selected state information for the target
  507.  *    thread.  If the thread is currently executing, the results
  508.  *    may be stale.  [Flavor THREAD_STATE_FLAVOR_LIST provides a
  509.  *    list of valid flavors for the target thread.]
  510.  */
  511. routine thread_get_state(
  512.         target_thread    : thread_t;
  513.         flavor        : int;
  514.     out    old_state    : thread_state_t, IsLong);
  515.  
  516. /*
  517.  *    Set the selected state information for the target thread.
  518.  *    If the thread is currently executing, the state change
  519.  *    may be ill-defined.
  520.  */
  521. routine    thread_set_state(
  522.         target_thread    : thread_t;
  523.         flavor        : int;
  524.         new_state    : thread_state_t, IsLong);
  525.  
  526. /*
  527.  *    Returns the current value of the selected special port
  528.  *    associated with the target thread.
  529.  */
  530. routine thread_get_special_port(
  531.         thread        : thread_t;
  532.         which_port    : int;
  533. #ifdef    NEW_MACH_IPC
  534.     out    special_port    : mach_port_t);
  535. #else    /* NEW_MACH_IPC */
  536.     out    special_port    : port_t);
  537. #endif    /* NEW_MACH_IPC */
  538.  
  539. /*
  540.  *    Set one of the special ports associated with the
  541.  *    target thread.
  542.  */
  543. routine thread_set_special_port(
  544.         thread        : thread_t;
  545.         which_port    : int;
  546. #ifdef    NEW_MACH_IPC
  547.         special_port    : mach_port_t);
  548. #else    /* NEW_MACH_IPC */
  549.         special_port    : port_t);
  550. #endif    /* NEW_MACH_IPC */
  551.  
  552. /*
  553.  *    Returns information about the target thread.
  554.  */
  555. routine    thread_info(
  556.         target_thread    : thread_t;
  557.         flavor        : int;
  558.     out    thread_info_out    : thread_info_t, IsLong);
  559.  
  560. skip;    /* task_set_emulation */
  561. skip;    /* task_ras_control */
  562. skip;    /* old host_ipc_statistics */
  563.  
  564. /*
  565.  *    Returns the set of port and port set names
  566.  *    to which the target task has access, along with
  567.  *    the type (set or port) for each name.
  568.  */
  569. routine port_names(
  570. #ifdef    NEW_MACH_IPC
  571.         task        : ipc_space_t;
  572. #else    /* NEW_MACH_IPC */
  573.         task        : task_t;
  574. #endif    /* NEW_MACH_IPC */
  575.     out    port_names_p    : port_name_array_t;
  576.     out    port_types    : port_type_array_t);
  577.  
  578. /*
  579.  *    Returns the type (set or port) for the port name
  580.  *    within the target task.
  581.  */
  582. routine port_type(
  583. #ifdef    NEW_MACH_IPC
  584.         task        : ipc_space_t;
  585. #else    /* NEW_MACH_IPC */
  586.         task        : task_t;
  587. #endif    /* NEW_MACH_IPC */
  588.         port_name    : port_name_t;
  589.     out    port_type_p    : port_type_t);
  590.  
  591. /*
  592.  *    Changes the name by which a port (or port set) is known to
  593.  *    the target task.
  594.  */
  595. routine port_rename(
  596. #ifdef    NEW_MACH_IPC
  597.         task        : ipc_space_t;
  598. #else    /* NEW_MACH_IPC */
  599.         task        : task_t;
  600. #endif    /* NEW_MACH_IPC */
  601.         old_name    : port_name_t;
  602.         new_name    : port_name_t);
  603.  
  604. /*
  605.  *    Allocate a new port (with all rights) in the target task.
  606.  *    The port name in that task is returned.
  607.  */
  608. routine port_allocate(
  609. #ifdef    NEW_MACH_IPC
  610.         task        : ipc_space_t;
  611. #else    /* NEW_MACH_IPC */
  612.         task        : task_t;
  613. #endif    /* NEW_MACH_IPC */
  614.     out    port_name    : port_name_t);
  615.  
  616. /*
  617.  *    Deallocate the port with the given name from the target task.
  618.  */
  619. routine port_deallocate(
  620. #ifdef    NEW_MACH_IPC
  621.         task        : ipc_space_t;
  622. #else    /* NEW_MACH_IPC */
  623.         task        : task_t;
  624. #endif    /* NEW_MACH_IPC */
  625.         port_name    : port_name_t);
  626.  
  627. /*
  628.  *    Set the number of messages that may be queued to
  629.  *    the port in the target task with the given name
  630.  *    before further message queueing operations block.
  631.  *    The target task must hold receive rights for the
  632.  *    port named.
  633.  */
  634. routine port_set_backlog(
  635. #ifdef    NEW_MACH_IPC
  636.         task        : ipc_space_t;
  637. #else    /* NEW_MACH_IPC */
  638.         task        : task_t;
  639. #endif    /* NEW_MACH_IPC */
  640.         port_name    : port_name_t;
  641.         backlog        : int);
  642.  
  643. /*
  644.  *    Return information about the port with the given
  645.  *    name in the target task.  Only the ownership and
  646.  *    receive_rights results are meaningful unless the
  647.  *    target task holds receive rights for the port.
  648.  */
  649. routine port_status(
  650. #ifdef    NEW_MACH_IPC
  651.         task        : ipc_space_t;
  652. #else    /* NEW_MACH_IPC */
  653.         task        : task_t;
  654. #endif    /* NEW_MACH_IPC */
  655.         port_name    : port_name_t;
  656.     out    enabled        : port_set_name_t;
  657.     out    num_msgs    : int;
  658.     out    backlog        : int;
  659.     out    ownership    : boolean_t;
  660.     out    receive_rights    : boolean_t);
  661.  
  662. /*
  663.  *    Allocate a new port set in the target task, returning
  664.  *    the name of that new port set.  [The new set is
  665.  *    initially empty.]
  666.  */
  667. routine port_set_allocate(
  668. #ifdef    NEW_MACH_IPC
  669.         task        : ipc_space_t;
  670. #else    /* NEW_MACH_IPC */
  671.         task        : task_t;
  672. #endif    /* NEW_MACH_IPC */
  673.     out    set_name    : port_set_name_t);
  674.  
  675. /*
  676.  *    Deallocate the named port set from the target task.
  677.  *    Ports that are currently members of the named port
  678.  *    set are first removed from the set.
  679.  */
  680. routine port_set_deallocate(
  681. #ifdef    NEW_MACH_IPC
  682.         task        : ipc_space_t;
  683. #else    /* NEW_MACH_IPC */
  684.         task        : task_t;
  685. #endif    /* NEW_MACH_IPC */
  686.         set_name    : port_set_name_t);
  687.  
  688. /*
  689.  *    Add the named port to the port set named within
  690.  *    the target task.  [If the port currently is a member
  691.  *    of another port set, it is removed from that set.]
  692.  */
  693. routine port_set_add(
  694. #ifdef    NEW_MACH_IPC
  695.         task        : ipc_space_t;
  696. #else    /* NEW_MACH_IPC */
  697.         task        : task_t;
  698. #endif    /* NEW_MACH_IPC */
  699.         set_name    : port_set_name_t;
  700.         port_name    : port_name_t);
  701.  
  702. /*
  703.  *    Remove the named port from the port set named within
  704.  *    the target task.
  705.  */
  706. routine port_set_remove(
  707. #ifdef    NEW_MACH_IPC
  708.         task        : ipc_space_t;
  709. #else    /* NEW_MACH_IPC */
  710.         task        : task_t;
  711. #endif    /* NEW_MACH_IPC */
  712.         port_name    : port_name_t);
  713.  
  714. /*
  715.  *    Returns the current set of ports that are members
  716.  *    of the named port set in the target task.
  717.  */
  718. routine port_set_status(
  719. #ifdef    NEW_MACH_IPC
  720.         task        : ipc_space_t;
  721. #else    /* NEW_MACH_IPC */
  722.         task        : task_t;
  723. #endif    /* NEW_MACH_IPC */
  724.         set_name    : port_set_name_t;
  725.     out    members        : port_name_array_t);
  726.  
  727. /*
  728.  *    Insert send rights for the specified port into
  729.  *    the target task with the specified port name.
  730.  *    [If the name is in use, or the target task already
  731.  *    has another name for the specified port, then
  732.  *    the operation will fail.]
  733.  */
  734. routine port_insert_send(
  735. #ifdef    NEW_MACH_IPC
  736.         task        : ipc_space_t;
  737. #else    /* NEW_MACH_IPC */
  738.         task        : task_t;
  739. #endif    /* NEW_MACH_IPC */
  740.         my_port        : port_t;
  741.         his_name    : port_name_t);
  742.  
  743. /*
  744.  *    Returns send rights for the named port in the
  745.  *    target task, removing that port name and port
  746.  *    send rights from the target task.  [If the
  747.  *    target task holds receive rights for this port,
  748.  *    the operation will fail.]
  749.  */
  750. routine port_extract_send(
  751. #ifdef    NEW_MACH_IPC
  752.         task        : ipc_space_t;
  753. #else    /* NEW_MACH_IPC */
  754.         task        : task_t;
  755. #endif    /* NEW_MACH_IPC */
  756.         his_name    : port_name_t;
  757.     out    his_port    : port_t);
  758.  
  759. /*
  760.  *    Insert receive rights for the specified port into
  761.  *    the target task with the specified port name.
  762.  *    [If the name is in use, or the target task already
  763.  *    has another name for the specified port, then
  764.  *    the operation will fail.
  765.  */
  766. routine port_insert_receive(
  767. #ifdef    NEW_MACH_IPC
  768.         task        : ipc_space_t;
  769. #else    /* NEW_MACH_IPC */
  770.         task        : task_t;
  771. #endif    /* NEW_MACH_IPC */
  772.         my_port        : port_all_t;
  773.         his_name    : port_name_t);
  774.  
  775. /*
  776.  *    Returns receive rights for the named port in the
  777.  *    target task, removing that port name and all port
  778.  *    rights from the target task.
  779.  */
  780. routine port_extract_receive(
  781. #ifdef    NEW_MACH_IPC
  782.         task        : ipc_space_t;
  783. #else    /* NEW_MACH_IPC */
  784.         task        : task_t;
  785. #endif    /* NEW_MACH_IPC */
  786.         his_name    : port_name_t;
  787.     out    his_port    : port_all_t);
  788.     
  789. skip;    /* vm_map */
  790. skip;    /* memory_object_data_error */
  791. skip;    /* memory_object_set_attributes */
  792. skip;    /* memory_object_destroy */
  793. skip;    /* memory_object_data_supply */
  794. skip;    /* memory_object_ready */
  795. skip;    /* memory_object_change_attributes */
  796. skip;    /* old host_callout_statistics_reset */
  797. skip;    /* old port_set_select */
  798.  
  799. /*
  800.  *    Sets a backup port for the named port.  The task
  801.  *    must have receive rights for the named port.
  802.  *    Returns the previous backup port, if any.
  803.  */
  804. routine port_set_backup(
  805. #ifdef    NEW_MACH_IPC
  806.         task        : ipc_space_t;
  807. #else    /* NEW_MACH_IPC */
  808.         task        : task_t;
  809. #endif    /* NEW_MACH_IPC */
  810.         port_name    : port_name_t;
  811. #ifdef    NEW_IPC_IPC
  812.         backup        : port_t = MACH_MSG_TYPE_MAKE_SEND
  813.                   ctype: mach_port_t;
  814. #else    /* NEW_MACH_IPC */
  815.         backup        : port_t;
  816. #endif    /* NEW_MACH_IPC */
  817.     out    previous    : port_t);
  818.  
  819. /*
  820.  *    Set/Get special properties of memory associated
  821.  *    to some virtual address range, such as cachability, 
  822.  *    migrability, replicability.  Machine-dependent.
  823.  */
  824. routine vm_machine_attribute(
  825.         target_task    : vm_task_t;
  826.         address        : vm_address_t;
  827.         size        : vm_size_t;
  828.         attribute    : vm_machine_attribute_t;
  829.     inout    value        : vm_machine_attribute_val_t);
  830.  
  831. skip;    /* old host_fpa_counters_reset */
  832.  
  833. /*
  834.  *    There is no more room in this interface for additional calls.
  835.  */
  836.  
  837. /* HMM .... */
  838.  
  839. /*
  840.  *  Synchronize the contents of an address space with backing store.
  841.  *  Dirty pages in the address range are written to their appropriate
  842.  *  backing store.  All pageouts are attempted.  If any pageout causes
  843.  *  an error, vm_synchronize returns KERN_FAILURE.  If a page would be
  844.  *  written to the default pager (swapfile), that page is skipped and
  845.  *  KERN_FAILURE is returned.  This call is synchronous.
  846.  */
  847. routine vm_synchronize(
  848.         target_task    : vm_task_t;
  849.         address        : vm_address_t;
  850.         size        : vm_size_t);
  851.  
  852. routine vm_set_policy(
  853.         target_task    : vm_task_t;
  854.         address        : vm_address_t;
  855.         size        : vm_size_t;
  856.         policy        : int);
  857.  
  858. routine vm_deactivate(
  859.         target_task    : vm_task_t;
  860.         address        : vm_address_t;
  861.         size        : vm_size_t;
  862.         when        : int);
  863.